using System;
using System.Collections.Generic;

namespace Managistics.Model
{
    [Serializable()]
    public class InputSheetDetail : Entity<double>
    {
        private string _itemId;
        private string _inputSheetDId;
        private Good _good;
        private InputSheet _inputSheetDomestic;
        private float _quantityInputD;
        private bool? _statusItemId;
        private double _id;
        public virtual string ItemId
        {
            get
            {
                return this._itemId;
            }
            set
            {
                this._itemId = value;
            }
        }
        public virtual string InputSheetId
        {
            get
            {
                return this._inputSheetDId;
            }
            set
            {
                this._inputSheetDId = value;
            }
        }
        public virtual Good Good
        {
            get
            {
                return this._good;
            }
            set
            {
                this._good = value;
            }
        }
        public virtual InputSheet InputSheet
        {
            get
            {
                return this._inputSheetDomestic;
            }
            set
            {
                this._inputSheetDomestic = value;
            }
        }
        public virtual float Quantity
        {
            get
            {
                return this._quantityInputD;
            }
            set
            {
                this._quantityInputD = value;
            }
        }
        public virtual bool? Status
        {
            get
            {
                return this._statusItemId;
            }
            set
            {
                this._statusItemId = value;
            }
        }
        public virtual double Id
        {
            get
            {
                return this._id;
            }
            set
            {
                this._id = value;
            }
        }
        #region NHibernate Composite Key Requirements
        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            var t = obj as InputSheetDetail;
            if (t == null) return false;
            if (ItemId == t.ItemId
             && InputSheetId == t.InputSheetId)
                return true;

            return false;
        }
        public override int GetHashCode()
        {
            int hash = GetType().GetHashCode();
            hash = (hash * 397) ^ ItemId.GetHashCode();
            hash = (hash * 397) ^ InputSheetId.GetHashCode();

            return hash;
        }
        #endregion
    }

}
